<template>
  <div class="ldm-select-wrap" :ref="refName">
    <div class="ldm-selected " :class="isShow?'select-show':'select-hide'" @click="changeShow">
      <span v-text="selected?label?selected[label]:selected:placeholder?placeholder:'请选择'"></span>
      <img class="icon" v-if="!isShow" src="./img/xiala.png"/>
      <img class="icon" v-if="isShow" src="./img/shangla.png"/>
    </div>
    <div class="ldm-options" v-if="isShow">
      <div class="ldm-option"
           :class="[label?selected&&selected[label] == item[label]?'active':'':selected == item?'active':'']"
           v-for="item in select"
           v-text="label?item[label]:item"
           @click="checkItem(item)"></div>
    </div>
  </div>
</template>
<script src="./ldmSelect.js"></script>
<style lang="scss">
  @import "./ldmSelect.scss";
</style>
